unsigned int cpu = smp_processor_id();
unsigned long j;
- /* s390 does this /before/ checking rcu_pending(). We copy them. */
+ /* We must do this /before/ checking rcu_pending(). */
cpu_set(cpu, nohz_cpu_mask);
+ smp_mb();
/* Leave ourselves in 'tick mode' if rcu or softirq pending. */
if (rcu_pending(cpu) || local_softirq_pending()) {
+++ /dev/null
-diff -pru ../pristine-linux-2.6.14/kernel/rcupdate.c ./kernel/rcupdate.c
---- ../pristine-linux-2.6.14/kernel/rcupdate.c 2005-10-28 01:02:08.000000000 +0100
-+++ ./kernel/rcupdate.c 2006-01-31 16:04:36.000000000 +0000
-@@ -227,8 +227,11 @@ static void rcu_start_batch(struct rcu_c
- */
- static void cpu_quiet(int cpu, struct rcu_ctrlblk *rcp, struct rcu_state *rsp)
- {
-+ cpumask_t mask;
-+
- cpu_clear(cpu, rsp->cpumask);
-- if (cpus_empty(rsp->cpumask)) {
-+ cpus_andnot(mask, rsp->cpumask, nohz_cpu_mask);
-+ if (cpus_empty(mask)) {
- /* batch completed ! */
- rcp->completed = rcp->cur;
- rcu_start_batch(rcp, rsp, 0);